home *** CD-ROM | disk | FTP | other *** search
- //--------------------------------------------------------------
- //
- // Invoice.rep - Mugs Sample Application
- //
- // The Mugs application uses this report to display
- // Invoices selected from the IReport.wfm.
- //
- // Dependencies: CONNECT.DMD
- // Invoice.dbf
- // Lineitem.dbf
- // Customer.dbf
- // Country.dbf
- //
- //
- // Visual dBASE Samples Group
- //
- // $Revision: 1.4 $
- //
- // Copyright (c) 1997, Borland International, Inc.
- // All rights reserved.
- //
- //---------------------------------------------------------------
-
- SET TALK OFF
- ** END HEADER -- do not remove this line
- //
- // Generated on 11/10/97
- //
- local r
- r = new INVOICEReport()
- r.render()
-
- class INVOICEReport of REPORT
- with (this)
- title = "Invoice"
- scaleFontSize = 8
- scaleFontBold = false
- endwith
-
-
- this.DMCONNECT = new DATAMODREF()
- this.DMCONNECT.parent = this
- with (this.DMCONNECT)
- filename = "connect.dmd"
- dataModClass = "ConnectDataModule"
- share = 0 // None
- active = true
- left = 0
- top = 0
- endwith
-
-
- this.INVOICE1 = new QUERY()
- this.INVOICE1.parent = this
- with (this.INVOICE1)
- left = 500
- top = 0
- database = form.DMCONNECT.ref.dbmugs
- sql = 'SELECT Invoice."Invoice ID", Invoice."Order Date", Invoice."Customer ID", Invoice."Pay Type", Invoice."Card Number", Invoice."Card Exp", Invoice."Card Name", Invoice."Check Number", Customer."Last Name", Customer."First Name", Customer.PHONE, Customer.STREET1, Customer.STREET2, Customer.CITY, Customer."State ID", Customer.POSTAL, Country.COUNTRY, Lineitem."Item ID", Inventory.DESCRIPTION, Lineitem.QTY LINEITEMQTY, Inventory.QTY INVENTORYQTY FROM "invoice.dbf" Invoice INNER JOIN "customer.dbf" Customer ON (Invoice."Customer ID" = Customer."Customer ID") INNER JOIN "lineitem.dbf" Lineitem ON (Invoice."Invoice ID" = Lineitem."Invoice ID") INNER JOIN "country.dbf" Country ON (Customer."Country ID" = Country."Country ID") INNER JOIN "inventory.dbf" Inventory ON (Lineitem."Item ID" = Inventory."Item ID") ORDER BY Invoice."Invoice ID"'
- requestLive = false
- active = true
- endwith
-
-
-
-
- this.STREAMSOURCE1 = new STREAMSOURCE(this)
-
-
-
- this.STREAMSOURCE1.GROUP1 = new GROUP(this.STREAMSOURCE1)
- with (this.STREAMSOURCE1.GROUP1)
- groupBy = "Invoice ID"
- endwith
-
-
- with (this.STREAMSOURCE1.GROUP1.headerBand)
- expandable = false
- height = 4000
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.headerBand.LABELINVOICEID = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
- with (this.STREAMSOURCE1.GROUP1.headerBand.LABELINVOICEID)
- height = 250
- left = 100
- top = 100
- width = 1200
- metric = 1 // Twips
- colorNormal = "maroon"
- fontName = "Times New Roman"
- fontSize = 12
- text = "Invoice #:"
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.headerBand.VALUEINVOICEID = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
- with (this.STREAMSOURCE1.GROUP1.headerBand.VALUEINVOICEID)
- height = 250
- left = 1300
- top = 100
- width = 1000
- metric = 1 // Twips
- colorNormal = "maroon"
- fontName = "Times New Roman"
- fontSize = 12
- text = {||this.parent.parent.parent.rowset.fields["Invoice ID"].value+""}
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.headerBand.VALUECUSTOMERID = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
- with (this.STREAMSOURCE1.GROUP1.headerBand.VALUECUSTOMERID)
- height = 250
- left = 1300
- top = 1300
- width = 1000
- metric = 1 // Twips
- variableHeight = true
- colorNormal = "black"
- fontSize = 9
- text = {||this.form.form.invoice1.rowset.fields["Customer ID"].value+""}
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.headerBand.LABELCUSTID = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
- with (this.STREAMSOURCE1.GROUP1.headerBand.LABELCUSTID)
- height = 250
- left = 400
- top = 1300
- width = 800
- metric = 1 // Twips
- colorNormal = "black"
- fontSize = 9
- text = "ID:"
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.headerBand.BOXCUST = new RECTANGLE(this.STREAMSOURCE1.GROUP1.headerBand)
- with (this.STREAMSOURCE1.GROUP1.headerBand.BOXCUST)
- left = 252
- top = 948
- width = 7000
- height = 1250
- metric = 1 // Twips
- text = "Customer"
- colorNormal = "WindowText/BtnFace"
- fontSize = 9
- fontBold = true
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.headerBand.VALUECUSTNAME = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
- with (this.STREAMSOURCE1.GROUP1.headerBand.VALUECUSTNAME)
- height = 240
- left = 1300
- top = 1600
- width = 2000
- metric = 1 // Twips
- variableHeight = true
- colorNormal = "black"
- fontSize = 9
- text = {||this.form.form.invoice1.rowset.fields["First Name"].value.rightTrim() + " " + this.form.form.invoice1.rowset.fields["Last Name"].value.rightTrim()}
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.headerBand.LABELNAME = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
- with (this.STREAMSOURCE1.GROUP1.headerBand.LABELNAME)
- height = 240
- left = 400
- top = 1600
- width = 800
- metric = 1 // Twips
- colorNormal = "black"
- fontSize = 9
- text = "Name:"
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.headerBand.VALUECITYSTATEZIP = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
- with (this.STREAMSOURCE1.GROUP1.headerBand.VALUECITYSTATEZIP)
- height = 250
- left = 4000
- top = 1900
- width = 2500
- metric = 1 // Twips
- variableHeight = true
- colorNormal = "BtnText"
- fontSize = 9
- text = {||this.form.form.invoice1.rowset.fields["CITY"].value.rightTrim() + ", " + this.form.form.invoice1.rowset.fields["State ID"].value.rightTrim() + " " + this.form.form.invoice1.rowset.fields["POSTAL"].value.rightTrim()}
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.headerBand.VALUESTREET1 = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
- with (this.STREAMSOURCE1.GROUP1.headerBand.VALUESTREET1)
- height = 250
- left = 4000
- top = 1300
- width = 2000
- metric = 1 // Twips
- variableHeight = true
- colorNormal = "BtnText"
- fontSize = 9
- text = {||this.form.form.invoice1.rowset.fields["STREET1"].value}
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.headerBand.VALUESTREET2 = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
- with (this.STREAMSOURCE1.GROUP1.headerBand.VALUESTREET2)
- height = 250
- left = 4000
- top = 1600
- width = 2000
- metric = 1 // Twips
- variableHeight = true
- colorNormal = "BtnText"
- fontSize = 9
- text = {||this.form.form.invoice1.rowset.fields["STREET2"].value}
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.headerBand.LABELADDRESS = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
- with (this.STREAMSOURCE1.GROUP1.headerBand.LABELADDRESS)
- height = 250
- left = 3000
- top = 1300
- width = 800
- metric = 1 // Twips
- colorNormal = "BtnText"
- fontSize = 9
- text = "Address:"
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.headerBand.LABELORDERDATE = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
- with (this.STREAMSOURCE1.GROUP1.headerBand.LABELORDERDATE)
- height = 240
- left = 100
- top = 500
- width = 1200
- metric = 1 // Twips
- colorNormal = "maroon"
- fontName = "Times New Roman"
- fontSize = 12
- text = "Order Date:"
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.headerBand.VALUEORDERDATE = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
- with (this.STREAMSOURCE1.GROUP1.headerBand.VALUEORDERDATE)
- height = 240
- left = 1300
- top = 500
- width = 1008
- metric = 1 // Twips
- variableHeight = true
- colorNormal = "maroon"
- fontName = "Times New Roman"
- fontSize = 12
- text = {||this.form.form.invoice1.rowset.fields["Order Date"].value}
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.headerBand.VALUEPAYNUMBER = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
- with (this.STREAMSOURCE1.GROUP1.headerBand.VALUEPAYNUMBER)
- height = 250
- left = 1650
- top = 2800
- width = 2100
- metric = 1 // Twips
- variableHeight = true
- colorNormal = "BtnText"
- fontSize = 9
- text = {;sNum = "";if ( this.form.form.invoice1.rowset.fields["Pay Type"].value=="CH" );sNum := this.form.form.invoice1.rowset.fields["Check Number"].value + "";else;sNum := this.form.form.invoice1.rowset.fields["Card Number"].value + "";endif;return (sNum);}
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.headerBand.VALUECARDNAME = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
- with (this.STREAMSOURCE1.GROUP1.headerBand.VALUECARDNAME)
- canRender = {||this.form.form.invoice1.rowset.fields["Pay Type"].value<>"CH"}
- height = 250
- left = 1674
- top = 3100
- width = 3276
- metric = 1 // Twips
- variableHeight = true
- colorNormal = "BtnText"
- fontSize = 9
- text = {||this.form.form.invoice1.rowset.fields["Card Name"].value}
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.headerBand.VALUECARDEXP = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
- with (this.STREAMSOURCE1.GROUP1.headerBand.VALUECARDEXP)
- canRender = {||this.form.form.invoice1.rowset.fields["Pay Type"].value<>"CH"}
- height = 240
- left = 5500
- top = 2800
- width = 1008
- metric = 1 // Twips
- variableHeight = true
- colorNormal = "BtnText"
- fontSize = 9
- text = {||this.form.form.invoice1.rowset.fields["Card Exp"].value}
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.headerBand.LABELCARDNAME = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
- with (this.STREAMSOURCE1.GROUP1.headerBand.LABELCARDNAME)
- canRender = {||this.form.form.invoice1.rowset.fields["Pay Type"].value<>"CH"}
- height = 250
- left = 400
- top = 3100
- width = 1200
- metric = 1 // Twips
- colorNormal = "BtnText"
- fontSize = 9
- text = "Name on card:"
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.headerBand.LABELPAYNUMBER = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
- with (this.STREAMSOURCE1.GROUP1.headerBand.LABELPAYNUMBER)
- height = 250
- left = 412
- top = 2800
- width = 1200
- metric = 1 // Twips
- colorNormal = "BtnText"
- fontSize = 9
- text = {;sLabel = "";if ( this.form.form.invoice1.rowset.fields["Pay Type"].value=="CH" );sLabel := "Check number: ";else;sLabel := "Card number: ";endif;return (sLabel)}
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.headerBand.TEXT1 = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
- with (this.STREAMSOURCE1.GROUP1.headerBand.TEXT1)
- height = 240
- left = 9888
- top = 2784
- width = 1008
- metric = 1 // Twips
- colorNormal = "BtnText"
- text = "Text1"
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.headerBand.LABELCARDEXP = new TEXT(this.STREAMSOURCE1.GROUP1.headerBand)
- with (this.STREAMSOURCE1.GROUP1.headerBand.LABELCARDEXP)
- canRender = {||this.form.form.invoice1.rowset.fields["Pay Type"].value<>"CH"}
- height = 240
- left = 3864
- top = 2800
- width = 1250
- metric = 1 // Twips
- colorNormal = "BtnText"
- fontSize = 9
- text = "Expiration Date:"
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.headerBand.BOXPAY = new RECTANGLE(this.STREAMSOURCE1.GROUP1.headerBand)
- with (this.STREAMSOURCE1.GROUP1.headerBand.BOXPAY)
- left = 252
- top = 2508
- width = 7000
- height = 960
- metric = 1 // Twips
- text = "Payment"
- colorNormal = "WindowText/BtnFace"
- fontSize = 9
- fontBold = true
- endwith
-
-
- with (this.STREAMSOURCE1.GROUP1.footerBand)
- expandable = false
- height = 1000
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.footerBand.LABELTOTALQTY = new TEXT(this.STREAMSOURCE1.GROUP1.footerBand)
- with (this.STREAMSOURCE1.GROUP1.footerBand.LABELTOTALQTY)
- height = 250
- left = 2300
- top = 200
- width = 2500
- metric = 1 // Twips
- colorNormal = "BLACK"
- fontSize = 9
- text = "Total Mugs At $10.00 Each:"
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.footerBand.VALUETOTALQTY = new TEXT(this.STREAMSOURCE1.GROUP1.footerBand)
- with (this.STREAMSOURCE1.GROUP1.footerBand.VALUETOTALQTY)
- height = 240
- left = 5000
- top = 200
- width = 1000
- metric = 1 // Twips
- variableHeight = true
- colorNormal = "BLACK"
- alignHorizontal = 2 // Right
- picture = "999"
- text = {||this.parent.parent.agSum({||this.parent.rowset.fields["LINEITEMQTY"].value})}
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.footerBand.LINE1 = new LINE(this.STREAMSOURCE1.GROUP1.footerBand)
- with (this.STREAMSOURCE1.GROUP1.footerBand.LINE1)
- left = 5500
- right = 6100
- top = 100
- bottom = 100
- width = 1
- metric = 1 // Twips
- colorNormal = "WindowText"
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.footerBand.LABELDOLLARS = new TEXT(this.STREAMSOURCE1.GROUP1.footerBand)
- with (this.STREAMSOURCE1.GROUP1.footerBand.LABELDOLLARS)
- height = 250
- left = 2300
- top = 500
- width = 2000
- metric = 1 // Twips
- colorNormal = "BtnText"
- fontSize = 9
- fontBold = true
- text = "Invoice Total:"
- endwith
-
-
- this.STREAMSOURCE1.GROUP1.footerBand.TEXT2 = new TEXT(this.STREAMSOURCE1.GROUP1.footerBand)
- with (this.STREAMSOURCE1.GROUP1.footerBand.TEXT2)
- height = 255
- left = 5000
- top = 500
- width = 1000
- metric = 1 // Twips
- colorNormal = "BtnText"
- alignHorizontal = 2 // Right
- fontSize = 9
- fontBold = true
- text = {||"$ " + this.parent.parent.agSum({||this.parent.rowset.fields["LINEITEMQTY"].value}) * 10}
- endwith
-
-
-
-
-
- this.STREAMSOURCE1.detailBand.TITLEITEMID = new TEXT(this.STREAMSOURCE1.detailBand)
- with (this.STREAMSOURCE1.detailBand.TITLEITEMID)
- canRender = {||this.parent.firstOnFrame}
- height = 300
- left = 1000
- top = 0
- width = 1000
- metric = 1 // Twips
- colorNormal = "BtnText"
- suppressIfBlank = true
- fontSize = 9
- fontBold = true
- fontUnderline = true
- text = "Item ID"
- endwith
-
-
- this.STREAMSOURCE1.detailBand.TEXTITEMID1 = new TEXT(this.STREAMSOURCE1.detailBand)
- with (this.STREAMSOURCE1.detailBand.TEXTITEMID1)
- height = 1
- left = 1000
- top = 300
- width = 1000
- metric = 1 // Twips
- variableHeight = true
- colorNormal = "BtnText"
- fontSize = 9
- text = {||this.form.invoice1.rowset.fields["Item ID"].value}
- endwith
-
-
- this.STREAMSOURCE1.detailBand.TITLEDESCRIPTION = new TEXT(this.STREAMSOURCE1.detailBand)
- with (this.STREAMSOURCE1.detailBand.TITLEDESCRIPTION)
- canRender = {||this.parent.firstOnFrame}
- height = 300
- left = 2300
- top = 0
- width = 2500
- metric = 1 // Twips
- colorNormal = "BtnText"
- suppressIfBlank = true
- fontSize = 9
- fontBold = true
- fontUnderline = true
- text = "Description"
- endwith
-
-
- this.STREAMSOURCE1.detailBand.TEXTDESCRIPTION1 = new TEXT(this.STREAMSOURCE1.detailBand)
- with (this.STREAMSOURCE1.detailBand.TEXTDESCRIPTION1)
- height = 1
- left = 2300
- top = 300
- width = 2500
- metric = 1 // Twips
- variableHeight = true
- colorNormal = "BtnText"
- fontSize = 9
- text = {||this.form.invoice1.rowset.fields["DESCRIPTION"].value}
- endwith
-
-
- this.STREAMSOURCE1.detailBand.TITLEQTY = new TEXT(this.STREAMSOURCE1.detailBand)
- with (this.STREAMSOURCE1.detailBand.TITLEQTY)
- canRender = {||this.parent.firstOnFrame}
- height = 300
- left = 5001
- top = 0
- width = 1000
- metric = 1 // Twips
- colorNormal = "BtnText"
- alignHorizontal = 2 // Right
- suppressIfBlank = true
- fontSize = 9
- fontBold = true
- fontUnderline = true
- text = "Qty"
- endwith
-
-
- this.STREAMSOURCE1.detailBand.VALUELINEQTY = new TEXT(this.STREAMSOURCE1.detailBand)
- with (this.STREAMSOURCE1.detailBand.VALUELINEQTY)
- height = 1
- left = 5001
- top = 300
- width = 1000
- metric = 1 // Twips
- variableHeight = true
- colorNormal = "BtnText"
- alignHorizontal = 2 // Right
- picture = "999"
- fontSize = 9
- text = {||this.form.invoice1.rowset.fields["LINEITEMQTY"].value}
- endwith
-
-
- this.PAGETEMPLATE1 = new PAGETEMPLATE(this)
- with (this.PAGETEMPLATE1)
- height = 15840
- width = 12240
- marginTop = 1080
- marginLeft = 1080
- marginBottom = 1080
- marginRight = 1080
- gridLineWidth = 0
- endwith
-
-
- this.PAGETEMPLATE1.STREAMFRAME1 = new STREAMFRAME(this.PAGETEMPLATE1)
- with (this.PAGETEMPLATE1.STREAMFRAME1)
- height = 11592
- left = 100
- top = 1000
- width = 9360
- metric = 1 // Twips
- form.STREAMFRAME1 = form.pagetemplate1.streamframe1
- endwith
-
-
- this.PAGETEMPLATE1.TEXT3 = new TEXT(this.PAGETEMPLATE1)
- with (this.PAGETEMPLATE1.TEXT3)
- height = 588
- left = 205
- top = 205
- width = 7344
- metric = 1 // Twips
- colorNormal = "maroon"
- alignVertical = 1 // Middle
- alignHorizontal = 1 // Center
- fontName = "Times New Roman"
- fontSize = 18
- text = "House of Mugs Invoice Statement"
- form.TEXT3 = form.pagetemplate1.text3
- endwith
-
-
- with (this.printer)
- duplex = 1 // None
- orientation = 1 // Portrait
- paperSource = 15
- paperSize = 1
- resolution = 4 // High
- color = 2 // Color
- trueTypeFonts = 2 // Download
- endwith
-
-
-
-
- this.firstPageTemplate = this.form.pagetemplate1
- this.form.pagetemplate1.nextPageTemplate = this.form.pagetemplate1
- this.form.pagetemplate1.streamframe1.streamSource = this.form.STREAMSOURCE1
- this.form.STREAMSOURCE1.rowset = this.form.invoice1.rowset
- endclass
-